libxl: Fix an ao completion bug; document locking policy
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 11 May 2012 17:59:04 +0000 (18:59 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 11 May 2012 17:59:04 +0000 (18:59 +0100)
commit738b3d44252221ed3be1a860366a15a2d1b9b091
tree3166a56c4c447c04d7fcef713aede4de7d80c9ae
parent823c89eeb5b927e735f69901169f280390ed2973
libxl: Fix an ao completion bug; document locking policy

Document the concurrent access policies for libxl__ao and libxl__egc,
and their corresponding gcs.

Fix a violation of the policy:

If an ao was submitted and a callback requested, and while the
initiating function was still running on the original thread, the ao
is completed on another thread, the completing thread would improperly
concurrently access the ao with the initiating thread.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxl/libxl_event.c
tools/libxl/libxl_internal.h